
package com.crl.module.media.player {
	import flash.events.IEventDispatcher;

	public interface IPlayer extends IEventDispatcher {
		
		function load(url:String):void;
		
		function play(position:int=0):void;
		
		function pause():void;
		
		function stop():void;
		
		function close():void;
		
		function get url():String;
		
		
		/**
		 * 取得当前声音大小 ;
		 * @return 
		 * 
		 */		
		function get volume():Number;
		
		/**
		 * 设置当前声音大小 ;
		 * @param value [0-1]
		 * 
		 */		
		function set volume(value:Number):void;
		
		
		/**
		 * 设置播放位置; 
		 * @param value
		 * 
		 */		
		function set position(value:Number):void;
		
		/**
		 * 取得当前播放位置; 
		 * @return 
		 * 
		 */		
		function get position():Number;
		
		
		/**
		 * audio 的总长度; 
		 * @return 
		 * 
		 */		
		function get totalTime():Number;
		
		
		/**
		 * 当前是否在播放; 
		 * @return 
		 * 
		 */		
		function get isPlaying():Boolean;
		
	}
	
}
